home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1993 December
/
PSL Monthly Shareware CD-ROM (December 1993).iso
/
prgmming
/
dos
/
asm
/
pc370_3.exe
/
lha
/
PET.ALC
< prev
next >
Wrap
Text File
|
1987-01-01
|
2KB
|
72 lines
TITLE 'PET - PRINT ELAPSED TIME IN SECONDS SINCE LAST CALL'
*
*
* 04/08/85 CODED
* 04/28/85 ADD DISPLAY OF DATE, TIME, INSTRUCTION COUNTER, INS/SEC
* 01/01/87 CHANGE SVC 16 TO USE CONTENTS OF R1 FOR COUNT IN R2.0
*
PET CSECT
USING *,R15
STM R14,R15,RSAVE
L R15,=V(DAT) DISPLAY DATE AND TIME
BALR R14,R15
USING *,R14
LM R14,R15,RSAVE
DROP R14
SVC ICNTSVC
LR R0,R1
L R1,INSCOUNT
ST R0,INSCOUNT SAVE LAST INSTR. COUNT
CVD R0,PWORK
MVC DCOUNT,MASKCNT
ED DCOUNT,PWORK+4
LA R2,DCNTMSG
SVC WTO DISPLAY CURRENT INSTRUCTION COUNTER
SR R0,R1
ST R0,INSDIFF SAVE TOTAL SINCE LAST CALL
L R15,=V(TIMER)
BALR R14,R15
USING *,R14
LM R14,R15,RSAVE
DROP R14
L R1,TSAVE
ST R0,TSAVE SAVE CURRENT TIMER VALUE IN 100TH SEC.
LTR R1,R1
BZR R14 EXIT NOW IF FIRST CALL
SR R0,R1
ST R0,SEC100 SAVE ELAPSED TIME IN 100TH SEC
CVD R0,PWORK
MVC DTIME,MASKSEC
ED DTIME,PWORK+4
L R1,INSDIFF
MH R1,=H'100' SET R0-R1 = 100 * INSTRUCTIONS IN INTERVAL
SR R0,R0
D R0,SEC100 SET R1 = INSTRUCTIONS PER SECOND
CVD R1,PWORK
MVC DIPS,MASKCNT
ED DIPS,PWORK+4
LA R2,DTIMEMSG
SVC WTO
BR R14
R15 EQU 15
R14 EQU 14
R2 EQU 2
R1 EQU 1
R0 EQU 0
RSAVE DC 2F'0'
TSAVE DC F'0'
INSCOUNT DC F'0'
INSDIFF DC F'0'
SEC100 DC F'0'
PWORK DC D'0'
MASKSEC DC X'402020',C',',X'202120',C'.',X'2020'
MASKCNT DC X'4020',C',',X'202020',C',',X'202020'
DCNTMSG DC C' INSTRUCTION COUNTER ='
DCOUNT DC CL10' Z,ZZZ,ZZZ',C'$'
DTIMEMSG DC C' ELAPSED TIME ='
DTIME DC CL10' ZZ,ZZ9.99',C' SEC INSTR/SEC = '
DIPS DC CL10' Z,ZZZ,ZZZ',C'$'
ICNTSVC EQU 16
WTO EQU 209
END